﻿@model IEnumerable<FO.ViewModels.MenuGroup>
@foreach (var m in Model)
{
    if (m.menuid == 8)
    {<ul>
        <li class="link money"><a href="#">@m.menuname</a></li>
        @foreach (var sub in m.subMenus)
        {
         
            <li><a href="@sub.Links">@sub.Name</a></li>

        }
    </ul>
    }
    else if (m.menuid == 9)
    {
    <ul>
        <li class="link insurance"><a>@m.menuname</a></li>
        @{ 
        try
        {
            System.Xml.Linq.XDocument xxxdoc = System.Xml.Linq.XDocument.Load("http://www.vnbaohiem.com/home/BottomSXml/" + (Request.Cookies["_culture"]["lang"]));

            var items = xxxdoc.Descendants("item");
            foreach (var item in items)
            {
            <li>
                <a target="_blank" href="http://www.vnbaohiem.com@{@item.Element("link").Value}">@item.Element("title").Value</a>

            </li>
                      
            }

        }
        catch { }   
        }
    </ul> 
    }
    else if (m.menuid == 10)
    {
    <ul>
        <li class="link travel"><a>@m.menuname</a></li>
        @{ 
        try
        {
            if ((Request.Cookies["_culture"]["lang"]) == "vi-VN")
            {

                System.Xml.Linq.XDocument xxxdoc = System.Xml.Linq.XDocument.Load("http://travelsavemoney.vn/bottom-vi.xml");

                var items = xxxdoc.Descendants("item");
                foreach (var item in items)
                {
            <li>
                @if (item.Element("linkmenu").Value == "http://www.vnbaohiem.com/")
                {
                    <a target="_blank" href="@{@item.Element("linkmenu").Value}">@item.Element("name").Value</a>
                }
                else
                {
                    <a target="_blank" href="http://travelsavemoney.vn@{@item.Element("linkmenu").Value}">@item.Element("name").Value</a>
                }
            </li>
                      
                }
            }
            else
            {
                System.Xml.Linq.XDocument xxxdoc = System.Xml.Linq.XDocument.Load("http://travelsavemoney.vn/bottom-en.xml");

                var items = xxxdoc.Descendants("item");
                foreach (var item in items)
                {
            <li>
                @if (item.Element("linkmenu").Value == "http://www.vnbaohiem.com/")
                {
                    <a target="_blank" href="@{@item.Element("linkmenu").Value}">@item.Element("name").Value</a>
                }
                else
                {
                    <a target="_blank" href="http://travelsavemoney.vn@{@item.Element("linkmenu").Value}">@item.Element("name").Value</a>
                }
            </li>
                      
                }
            }

        }
        catch { }   
        }
    </ul> 
    }

}